<!DOCTYPE html>
<html>
<head>
	<meta charset="UTF-8">
	<title>Sistem Informasi Sekolah</title>
	<link rel="shortcut icon" href="<?php echo base_url();?>asset/login/images/twh.png"> 
	
	<!-- CSS START -->
    <!-- Begin : CSS -->
	<link href='<?=base_url();?>asset/bootstrap/css/bootstrap.min.css' rel='stylesheet'>
	<link href='<?=base_url();?>asset/bootstrap/css/font-awesome.min.css' rel='stylesheet'>
	<!--link href='<?=base_url();?>asset/bootstrap/css/ionicons.min.css' rel='stylesheet'>
	<link href='<?=base_url();?>asset/bootstrap/css/morris/morris.css' rel='stylesheet'>
	<link href='<?=base_url();?>asset/bootstrap/css/jvectormap/jquery-jvectormap-1.2.2.css' rel='stylesheet'>
	<link href='<?=base_url();?>asset/bootstrap/css/buds-generic.css' rel='stylesheet'>
	<link href='<?=base_url();?>asset/bootstrap/css/daterangepicker/daterangepicker-bs3.css' rel='stylesheet'>
	<link href='<?=base_url();?>asset/bootstrap/css/fullcalendar/fullcalendar.css' rel='stylesheet'>
	<link href='<?=base_url();?>asset/bootstrap/css/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css' rel='stylesheet'>
	<link href='<?=base_url();?>asset/bootstrap/css/AdminLTE.css' rel='stylesheet'
	<link rel="stylesheet" type="text/css" href="<?=base_url();?>asset/css/style.css" />-->
	<link rel="stylesheet" type="text/css" href="<?=base_url();?>asset/css/style.css" />
	<link rel="stylesheet" type="text/css" href="<?=base_url();?>asset/easyui/themes/metro/easyui.css" />
	<link rel="stylesheet" type="text/css" href="<?=base_url();?>asset/easyui/themes/icon.css" />
	<!-- End : CSS -->
	<!-- CSS END -->
	<!-- JS START -->
	<!-- Begin : Javacript -->
	<script type="text/javascript" src="<?=base_url();?>asset/easyui/jquery.min.js"></script>
	<script type="text/javascript" src="<?=base_url();?>asset/easyui/jquery.easyui.min.js"></script>
	<script type="text/javascript" src="<?=base_url();?>asset/easyui/plugins/jquery.datagrid-groupview.js"></script>
	<script type="text/javascript" src="<?=base_url();?>asset/easyui/plugins/jquery.datagrid-filter.js"></script>
	<script type="text/javascript" src="<?=base_url();?>asset/easyui/plugins/jquery.datagrid-detailview.js"></script>
	
	<!--script src='<?=base_url();?>asset/bootstrap/js/jquery-2.0.2.min.js'></script> 
	<script src='<?=base_url();?>asset/bootstrap/js/jquery-ui-1.10.3.min.js'></script> 
	<script src='<?=base_url();?>asset/bootstrap/js/AdminLTE/app.js'></script> 
	<script src='<?=base_url();?>asset/bootstrap/js/plugins/sparkline/jquery.sparkline.min.js'></script> 
	<script src='<?=base_url();?>asset/bootstrap/js/plugins/morris/morris.min.js'></script> 
	<script src='<?=base_url();?>asset/bootstrap/js/plugins/jvectormap/jquery-jvectormap-1.2.2.min.js'></script> 
	<script src='<?=base_url();?>asset/bootstrap/js/plugins/jvectormap/jquery-jvectormap-world-mill-en.js'></script> 
	<script src='<?=base_url();?>asset/bootstrap/js/plugins/daterangepicker/daterangepicker.js'></script> 
	<script src='<?=base_url();?>asset/bootstrap/js/plugins/fullcalendar/fullcalendar.min.js'></script> 
	<script src='<?=base_url();?>asset/bootstrap/js/plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.all.min.js'></script> 
	<script src='<?=base_url();?>asset/bootstrap/js/plugins/jqueryKnob/jquery.knob.js'></script> 
	<script src='<?=base_url();?>asset/bootstrap/js/plugins/iCheck/icheck.min.js'></script> 
	<script src='<?=base_url();?>asset/bootstrap/js/raphael-min.js'></script> 
	<script src='<?=base_url();?>asset/bootstrap/js/buds-generic.js'></script--> 
	<script src='<?=base_url();?>asset/bootstrap/js/bootstrap.min.js'></script> 

	<!-- End : Javacript -->    <!-- JS END -->
	
</head>
<body class="easyui-layout">
	<script>
		base_url = '<?=base_url();?>';
		
		$(document).ready(function(){
			
			$('#konten').panel({
				href:base_url+'main/dashboard'
			});
			
			check_login = function(){
				$.ajax({
				  url: base_url+"auth/cekstatuslogin",
				  data: { },
				  success : function(data, textStatus){
					//alert(data);
					if (data=="0" || data==""){
						window.location.replace(base_url+"auth/login");
					}
				  },
				  complete: function(xmlHttp) {
					// xmlHttp is a XMLHttpRquest object
					//if (xmlHttp.status==200) window.location.replace(base_url+"security/login");
				  }
				});
			}
			
			
			// cek login
			jQuery(document).ajaxStart(function(){
				check_login();
			});
			
			
			// load menu kiri
			loadmenu = function(module){
				$('#leftMenu').tree({
					checkbox: false,
					url: base_url+'auth/loadMenu/'+module,

					onClick:function(node){		
						$(this).tree('toggle', node.target);
						
						var b = $('#tt2').tree('isLeaf', node.target);
						if (b){
							setTimeout(function(){
								//addTab(node.text,node.attributes.url);
								//alert('you click '+node.attributes.url);
									$('#konten').panel({
										href:base_url+node.attributes.url
									});
							}, 100);
						};
					}
					
				});
				
				//ganti logo
				switch(module){
					case 'AKDSD' :  $('#logo_module').html('<i class="fa fa-book fa-lg">');
									$('#caption_module').html('Akademik');
						break;
					case 'PSBSD' :  $('#logo_module').html('<i class="fa fa-book fa-lg">');
									$('#caption_module').html('Penerimaan Siswa Baru');
						break;
					case 'SET' :  $('#logo_module').html('<i class="fa fa-book fa-lg">');
									$('#caption_module').html('Setting Data Master');
						break;
				}
				
			}
			
			//var node1 = $('#leftMenu').tree('find',1);
			// var node2 = $('#leftMenu').tree('find',16);
			// $('#leftMenu').tree('expandTo', node2.target).tree('select', node1.target);
			
			// format date picker
			DateFormatter = function(date){
				var y = date.getFullYear();
				var m = date.getMonth()+1;
				var d = date.getDate();
				//return y+'/'+(m<10?('0'+m):m)+'/'+(d<10?('0'+d):d);
				return (d<10?('0'+d):d) + '/' + (m<10?('0'+m):m) + '/' + y;
			}
			DateParser = function(s){
				if (!s) return new Date();
				var ss = (s.split('/'));
				var y = parseInt(ss[2],10);
				var m = parseInt(ss[1],10);
				var d = parseInt(ss[0],10);
				if (!isNaN(y) && !isNaN(m) && !isNaN(d)){
					return new Date(y,m-1,d);
				} else {
					return new Date();
				}
			}
			
			// dialog error
			ShowMessageError = function(str){
				$.messager.show({
					title:'Error',
					msg: str,
					showType:'slide',
					style:{
						left:0,
						right:'',
						top:'',
						bottom:-document.body.scrollTop-document.documentElement.scrollTop,
						background:'#ffcece'
					}
				});
			}
			
			// untuk data grid
			ShowGridMessage = function(target, message){
				var opts = $(target).datagrid('options');
				var vc = $(target).datagrid('getPanel').children('div.datagrid-view');
				
				vc.children('div.datagrid-empty').remove();
				
				if (!$(target).datagrid('getRows').length){
					var d = $('<div class="datagrid-empty"></div>').html(message).appendTo(vc);
					d.css({
						position:'absolute',
						left:0,
						top:50,
						width:'100%',
						textAlign:'center'
					});
				}else{
					vc.children('div.datagrid-empty').remove();
				}
			}
			
			// popup windows
			popupwindow = function(url, title, w, h) {
			  var left = (screen.width/2)-(w/2);
			  var top = (screen.height/2)-(h/2);
			  return window.open(url, title, 'toolbar=no, location=no, directories=no, status=no, menubar=no, scrollbars=no, resizable=no, copyhistory=no, width='+w+', height='+h+', top='+top+', left='+left);
			} 
			
			// inisialisasi dialog box
			// $('#window').dialog({
				// style:{background:'#def5ff'}
			// });
			
			// init
			check_login();
			
			
			
		});
	</script>
	
	<style type="text/css">
		#fm<?=$objectId;?>{
			margin:0;
			padding:10px 30px;
		}
		.ftitle{
			font-size:14px;
			font-weight:bold;
			color:#666;
			padding:5px 0;
			margin-bottom:10px;
			border-bottom:1px solid #ccc;
		}
		.fitem{
			margin-bottom:5px;
		}
		.fitem label{
			display:inline-block;
			min-width:30px;
		}
		
	  .fsearch{
		background:#fafafa;
		border-radius:5px;
		-moz-border-radius:0px;
		-webkit-border-radius: 5px;
		-moz-box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2);
		-webkit-box-shadow: 2px 2px 3px rgba(0, 0, 0, 0.2);
		filter: progid:DXImageTransform.Microsoft.Blur(pixelRadius=2,MakeShadow=false,ShadowOpacity=0.2);
		margin-bottom:0px;
		border: 1px solid #99BBE8;
	    color: #15428B;
	    font-size: 12px;
	    position: relative;
	  }
	  
	  .fsearch div{
		background:url('<?=base_url();?>public/css/themes/gray/images/panel_title.gif') repeat-x;
		height:200%;
		border-bottom: 1px solid #99BBE8;
		color:#15428B;
		font-size:9pt;
		/*text-transform:uppercase;*/
	    /*font-weight: bold;*/
	    padding: 3px 5px 0px 5px;
	    position: relative;
	  }
	  
	  .fsearch table{
	    padding: 2px;
		margin:2px 2px 3px 3px;
	  }
	  
	  .fsearch label{
		display:inline-block;
		width:60px;
	  }
	  
	  .fsearch input{
		margin:2px 2px 2px 2px;
	  }
	  
	  .fsearch select{
		margin:2px 2px 2px 2px;
	  }
	  
	  
		.fitemArea{
			margin-bottom:5px;
			text-align:left;
			/* border:1px solid blue; */
		}
		.fitemArea label{
			display:inline-block;
			width:84px;
			margin-bottom:5px;
		}
		
		
		.tbl {
			width: 100%;
			padding: 0;
			margin: 0;
		}
		
		.tbl th{
			font: normal 12px;
			color: #4f6b72;
			border-right: 1px solid #C1DAD7;
			border-bottom: 1px solid #C1DAD7;
			border-top: 1px solid #C1DAD7;
			border-left: 1px solid #C1DAD7;
			/*text-align: left;*/
			padding: 2px 2px 3px 4px;
			margin:0;
			background: #CAE8EA url(<?=base_url();?>asset/images/th.png) repeat-x;
		}
		
		.tbl td{
			border-right: 1px solid #C1DAD7;
			border-left: 1px solid #C1DAD7;
			border-top: 1px solid #C1DAD7;
			border-bottom: 1px solid #C1DAD7;
			padding: 3px 3px 3px 5px;
			margin:0;
		}
		
		.tbl tr{
			margin:0;
		}
		
		input {
			background-color:#FFF;
			border:1px solid #abadb3;
			color:#000;
			padding:2px;
			/*text-transform: uppercase;*/
		}
		
		select {
			background-color:#FFF;
			border:1px solid #abadb3;
			color:#000;
			padding:1px;
		}
		
		input:focus {
			background-color:#FFF;
			border:1px solid #569de5;
			color:#000;
			padding:2px;
		}
		
		.labeltitle{
			font-family:tahoma;
			font-size:13px;
			font-weight:bold;
			margin:15px 2px 2px 0px;
		}
		
		.labelseparator{
			border-color:#F00;
			margin:3px 0px 5px 0px;
			border-width:1px;
		}
		
		.alink{
			float:left;
			display: block;
			margin: 0px 2px 0px 2px;
			text-indent: -9999px;
			width: 20px;
			height: 16px;
		}
		.alink:hover{
			border:solid 1px #AAA;
		}
		
	</style>
	
	
	
	<div data-options="region:'north',border:false" style="height:50px;background:#3C8DBC;">
		<!-- bagian atas -->
		<a class="logo" href="#">
			<!-- Add the class icon to your logo image or logo icon to add the margining -->
			SKULNET
		</a>
		<!-- Sidebar toggle button-->
		<div class="navbar-right">
		  <ul class="nav navbar-nav">
			
			<?if($this->mdl_auth->is_module_active('SET')){?>
			<li class="dropdown messages-menu">
			  <a class="dropdown-toggle" href="#" onclick="javascript:loadmenu('SET')">
				<i class="fa fa-gear fa-lg"></i>&nbsp;
				<span>Setting</span>
			  </a>
			</li>
			<?}?>
			
			<?if($this->mdl_auth->is_module_active('PSBSD')){?>
			<li class="dropdown messages-menu">
			  <a class="dropdown-toggle" href="#" onclick="javascript:loadmenu('PSBSD')">
				<i class="fa fa-book fa-lg"></i>&nbsp;
				<span>PSB</span>
			  </a>
			</li>
			<?}?>
			
			<?if($this->mdl_auth->is_module_active('AKDSD')){?>
			<li class="dropdown notifications-menu">
			  <a class="dropdown-toggle" href="#" onclick="javascript:loadmenu('AKDSD')">
				<i class="fa fa-tasks fa-lg"></i>&nbsp;
				<span>Akademik</span>
			  </a>
			</li>
			<?}?>
			<!-- Tasks: style can be found in dropdown.less -->
			<li class="dropdown tasks-menu">
			  <a data-toggle="dropdown" class="dropdown-toggle" href="#">
				<i class="fa fa-random fa-lg"></i>&nbsp;
				<span>Laporan</span>
			  </a>
			</li>
			<!-- User Account: style can be found in dropdown.less -->
			<li class="dropdown user user-menu">
			  <a class="dropdown-toggle" href="<?=base_url()?>auth/logout">
				  <i class="fa fa-user fa-lg"></i>&nbsp;		
				  Log Out
				<!--span>Jane Doe <i class="caret"></i></span-->
			  </a>
			  <!--ul class="dropdown-menu">
				<!-- User image >
				<li class="user-header bg-light-blue">
				  <img src="http://ryh-pc/academic-system/assets/img/avatar3.png">   		
				  <p>
					Jane Doe - Web Developer
					<small>Member since Nov. 2012</small>
				  </p>
				</li>
				<!-- Menu Body >
				<li class="user-body">
				  <div class="col-xs-4 text-center">
					<a href="#">Followers</a>
				  </div>
				  <div class="col-xs-4 text-center">
					<a href="#">Sales</a>
				  </div>
				  <div class="col-xs-4 text-center">
					<a href="#">Friends</a>
				  </div>
				</li>
				<!-- Menu Footer>
				<li class="user-footer">
				  <div class="pull-left">
					<a class="btn btn-default btn-flat" href="#">Profile</a>
				  </div>
				  <div class="pull-right">
					<a class="btn btn-default btn-flat" href="#">Sign out</a>
				  </div>
				</li>
			  </ul-->
			</li>
		  </ul>
		</div>
		<!--div style="position:absolute;">
			<img src="<?=base_url()?>asset/images/logo.png">
		</div>
		<div class="bg">
			<div class="rpanel">
				<a href="#" >Beranda</a>
				<a class="separator" >|</a>
				
				<a href="<?=base_url()?>main" >Akademik</a>
				<a class="separator" >|</a>
				
				<a href="#" >PSB</a>
				<a class="separator" >|</a>
				
				<a href="#" >Keuangan</a>
				<a class="separator" >|</a>
				
				<a href="<?=base_url()?>auth/logout" >Logout</a>
				<div class="clear"></div>
			</div>
			<div class="clear"></div>
		</div-->
	</div>
	
	<div data-options="region:'west',split:true,title:' '" style="width:220px;padding:10px;">
		<div align="center">
			<!--img src="<?=base_url()?>asset/images/icon_module.jpg"-->
			<h2 id="logo_module"><i class="fa fa-book fa-lg"></i></h2>
			<h5 id="caption_module">Penerimaan Siswa Baru</h5>
		</div>
		<br>
		<!-- bagian menu -->
		<ul id="leftMenu" ></ul>
	</div>
		<!-- bagian bawah -->
	<!--<div data-options="region:'south',border:false" style="height:20px;background:#817e68;padding:3px;color:#FFFFFF;">
		<div id="versionBar" align="center">
			Copyright 2014  All Rights Reserved
		</div>
	</div>-->
	<div data-options="region:'center'">
		<!-- bagian konten -->
		<div id="konten" class="easyui-panel" data-options="fit:true,border:false">
			
		</div>
	</div>
	<div data-options="region:'south'" id="footer">
		<div class="footer_content">
	        <div class="footer_bottom">
	            <div class="copyright" style="align:center">&copy; 2014 - <a href="#" target="_blank">Sistem Informasi Sekolah</a></div>
	        </div>
	     <div class="clear"></div>   
		</div><!--end footer content-->
	</div>
</body>
</html>